import {request} from "@/utils/request.js"

const status = {
    1: "未提交",
    2: "已提交",
    3: "已派单",
    4: "已完成",
}

const userApiService = {
    list(param) {
        let params = {
            hasQuery: true,
            column: "id",
            order: "asc",
            ...param
        }
        return request("/tbx/online/cgform/api/getData/4028829490103d260190103d26aa0000", "get", params)
    },
    detail(params) {
        return request(`/tbx/online/cgform/api/detail/4028829490103d260190103d26aa0000/${params.id}`)
    },
    update(data) {
        return request("/tbx/online/cgform/api/form/4028829490103d260190103d26aa0000?tabletype=1", "put", data)
    },
    buyList(param) {
        let params = {
            hasQuery: true,
            column: "id",
            order: "asc",
            ...param
        }
        return request("/tbx/online/cgform/api/getData/09015351151f4a69b4e4066547cdfe75", 'get', params)
    },
    getMtCouponGroup(data) {

        return request("/tbx/online/cgform/api/getData/mt_coupon_group?column=id&order=desc&pageNo=1&pageSize=99&superQueryMatchType=or")
    },
    getMtCoupon(data) {
        return request("/fuint-application/clientApi/coupon/list", 'post', data)
    },
    getMtStore() {
        return request("/tbx/online/cgform/api/getData/mt_store?column=id&order=desc&pageNo=1&pageSize=10&superQueryMatchType=or")
    },
    putCoupon(data) {
        return request(`/fuint-application/backendApi/coupon/sendCoupon?couponId=${data.couponId}&userIds=${data.userId}&object=part&num=${data.number}&remark=`)
    },

    getAddressList() {
        return request("/fuint-application/clientApi/address/list")
    },
    getAddressTree() {
        return request("/fuint-application/clientApi/region/tree")
    },
    addressSave(data) {
        return request("/fuint-application/clientApi/address/save", "post", data)
    },
    pay(data) {
        return request("/fuint-application/clientApi/settlement/submit", "post", data)
    },
    cartSave(data) {
        return request("/fuint-application/clientApi/cart/save", "post", data)
    },
    getCartList(data) {
        return request("/fuint-application/clientApi/cart/list", "post")
    },
    addressSaveFun(data) {
        return request("/fuint-application/clientApi/address/save", "post", data)
    },
    getAddressDefault(data) {
        return request("/fuint-application/clientApi/address/detail", "post", data)
    },
    getAnnountCement(data) {
        return request("/tbx/sys/annountCement/listByUser", "get")
    },
    getAnnountCementList(data) {
        return request("/tbx/sys/annountCement/list", "get")
    },
    getDeviceLog(data) {
        return request("/tbx/kangyang/mdDeviceLog/list", "get")
    },
    getStoresList(data) {
        return request("/tbx/kangyangu/cuStore/list", "get")
    },
    sendVerifyCode(data) {
        return request("/fuint-application/clientApi/sms/sendVerifyCode", "post", data)
    },
    nRegister(data) {
        return request("/fuint-application/clientApi/sign/nRegister", "post", data)
    },
    signIn(data) {
        return request("/fuint-application/clientApi/sign/signIn", "post", data)
    },
    saveInfo(data) {
        return request("/fuint-application/clientApi/user/saveInfo", "post", data)
    },
    queryTotData(params) {
        return request("/tbx/kangyang/cuCustomer/queryTotData?day=" + params.day, "get")
    },

    getDatatoken(params) {
        return request("/tbx/online/cgform/api/getData/7fe09c3bc03a4ad38cf87ea4d45006df", "get")
    },
    cuStorelist(params) {
        return request("/tbx/kangyangu/cuStore/list", "get")
    },
    menform(data) {
        return request("/tbx/online/cgform/api/form/45e545e15e8344eebf723ce231f78b21?tabletype=2", "post", data)
    },
    queryCustomer(params) {
        return request("/tbx/kangyangu/cuStore/queryCustomer", "get")
    },
    executeRuleByCode(params) {
        return request("/tbx/sys/fillRule/executeRuleByCode/" + params.rule, "Put")
    },
    zulinform(data) {
        return request("/tbx/online/cgform/api/form/f46193d4a1e240a59705e299bbaea821?tabletype=2", "post", data)
    },
    zulist(data) {
        return request("/tbx/online/cgform/api/getData/f46193d4a1e240a59705e299bbaea821", "get")
    },
    cuPay(params) {
        return request("/tbx/kangyang/cuPay/list?code=" + params.code, "get")
    },
    userChancle(data) {
        return request("/tbx/kangyangu/mdDeviceApply/userChancle", "post", data)
    },
    ndetail(params) {
        return request("/tbx/kangyangu/mdDeviceApply/queryById?id=" + params.pid, "get")
    },

    applyadd(data) {
        return request("/tbx/kangyangu/mdDeviceApply/add", "post", data)
    },
    applyedit(data) {
        return request("/tbx/kangyangu/mdDeviceApply/edit", "post", data)
    },
    slist(params) {
        return request("/tbx/kangyangu/mdDeviceApply/list", "get")
    },
    wuliuquery(params) {
        return request("/tbx/kangyang/mdPostStatus/query?postCode=" + params.postCode + "&postNo=" + params.postNo, "get")
    },
    listByUsernew(params) {
        return request("/tbx/sys/annountCement/listByUser?pageSize=5", "get")
    },
    editByAnntIdAndUserId(data) {
        return request("/tbx/sys/sysAnnouncementSend/editByAnntIdAndUserId", "put", data)
    },


};

export default userApiService
